import request from '@/utils/request'

// 1. 获取  全部频道 接口
export const getAllChannels = function() {
  return request({
    method: 'GET',
    url: '/channels'
  })
}

export const setChannels = function(channels) {
  return request({
    method: 'PATCH',
    url: '/user/channels',
    data: {
      channels: [channels]
    }
  })
}
// 1. 封装请求方法
export const deleteUserChannel = channelId => {
  return request({
    method: 'DELETE',
    url: `/user/channels/${channelId}`
  })
}
